REM script to start web crawler
ECHO starting web crawler

IF (%JAVA_HOME%=="") goto nojavahome

SET RETAILER_ID=%1
SET WEB_CRAWLER_HOME=%CD%\..

CALL %WEB_CRAWLER_HOME%\bin\setup-environment.bat %WEB_CRAWLER_HOME%

REM Setting Java options
SET JAVA_VM_ARGS=-Xms40m -Xmx4092m -Dkalua.env=dev -Djava.util.concurrent.ForkJoinPool.common.parallelism=10
SET DEBUG_OPTS=-Xdebug -Xrunjdwp:transport=dt_socket,address=11555,server=y,suspend=n
REM SET JAVA_VM_ARGS=%JAVA_VM_ARGS% %DEBUG_OPTS% 

REM now invoke the application
SET WEB_CRAWLER_SERVER_ARGS=-retailer %1
%JAVA_HOME%\bin\java %JAVA_VM_ARGS% -cp %WEB_CRAWLER_CLASSPATH% com.kalua.list.harvester.Start %WEB_CRAWLER_SERVER_ARGS% 
goto end

:nojavahome
ECHO The JAVA_HOME environment variable has not been set. 

:end